﻿<%@ Control Language="C#" AutoEventWireup="true" Codebehind="ModuleDefinitionEdit.ascx.cs" Inherits="Portal.Administrator.Modules.ModuleDefinitionEdit" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="Framework.FilePickerControl" Namespace="Framework.FilePicker" TagPrefix="cc1" %>
<asp:UpdatePanel ID="upanelModuleDefinitionEdit" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
    <table border="0" cellpadding="0" cellspacing="1" class="content" width="100%">
        <tr>
            <td class="postheader" width="30%" align="left" valign="top">
                <table border="0" cellpadding="0" cellspacing="1" class="content" style="width: 100%">
                    <tr>
                        <td class="post" align="left">
                            <asp:DropDownList ID="drgModules" runat="server" Width="276px" AutoPostBack="True" OnSelectedIndexChanged="drgModules_SelectedIndexChanged">                                
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="post" align="left">
                            <asp:TreeView ID="tvwControls" runat="server"  ExpandImageUrl="/Administrator/Resource/Images/TreeView/col.gif" CollapseImageUrl="/Administrator/Resource/Images/TreeView/exp.gif" NodeStyle-CssClass="TreeNode" NodeIndent="15" NoExpandImageUrl="/Administrator/Resource/Images/TreeView/noexp.gif"
                            HoverNodeStyle-CssClass="HoverTreeNode" SelectedNodeStyle-CssClass="SelectedTreeNode" OnSelectedNodeChanged="tvwControls_SelectedNodeChanged" >                   
                            </asp:TreeView>
                        </td>
                    </tr>
                </table>
            </td>
            <td class="post" width="70%" align="left" valign="top">
                <table border="0" cellpadding="0" cellspacing="1" class="content" style="width: 100%">
                    <tr>
                        <td class="header1" colspan="2" align="left">
                            <asp:Label ID="lblCommandName" runat="server"></asp:Label><asp:HiddenField ID="txtControlKey" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="header2" height="18">
                            <asp:Label ID="lblUpdateStatus" runat="server" Font-Bold="True" ForeColor="Blue"></asp:Label>
                        </td>
                    </tr>
                    <tr>                        
                        <td class="postheader" width="25%" align="left">
                            <asp:Label ID="lblID" runat="server" Text="Control ID"></asp:Label></td>
                        <td class="post" width="75%" align="left">
                            <asp:TextBox ID="txtID" runat="server" Font-Bold="True" Enabled="false"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            <asp:Label ID="lblName" runat="server" Text="Tên module"></asp:Label></td>
                        <td class="post" width="75%" align="left">
                            <asp:Label ID="lblModuleName" runat="server" Font-Bold="True"></asp:Label></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            <asp:Label ID="lblControlName" runat="server" Text="Tên control"></asp:Label></td>
                        <td class="post" width="75%" align="left">
                            <asp:TextBox ID="txtControlName" runat="server" Width="276px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtControlName" ErrorMessage="Chưa nhập tên control"></asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            <asp:Label ID="lblControlTitle" runat="server" Text="Alias"></asp:Label></td>
                        <td class="post" width="75%" align="left">
                            <asp:TextBox ID="txtControlTitle" runat="server" Width="276px"></asp:TextBox></td>
                    </tr>    
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            <asp:Label ID="lblPath" runat="server" Text="Đường dẫn"></asp:Label></td>
                        <td class="post" width="75%" align="left">
                            <asp:DropDownList ID="dropPath" runat="server" Width="418px">
                            </asp:DropDownList></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            <asp:Label ID="lblSymbol" runat="server" Text="Biểu tượng"></asp:Label></td>
                        <td class="post" width="75%" align="left">
                            <cc1:FilePicker ID="txtControlIcon" runat="server" fpPopupURL="/FilePicker/TUFilePicker.aspx" Width="313px" FileName="" fpAllowedUploadFileExts="" fpUploadSizeLimit="0"></cc1:FilePicker></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            <asp:Label ID="lblHeaderVisible" runat="server" Text="Hiển thị header"></asp:Label></td>
                        <td class="post" width="75%" align="left">
                            <asp:CheckBox ID="chkControlHeader" runat="server" Checked="True" /></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            <asp:Label ID="lblRoles" runat="server" Text="Quyền truy cập"></asp:Label></td>
                        <td class="post" width="75%" align="left">
                            <asp:CheckBoxList ID="chkControlType" runat="server" RepeatDirection="Horizontal" CellPadding="0" CellSpacing="0" DataTextField="RoleName" DataValueField="RoleID">
                            </asp:CheckBoxList></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            <asp:Label ID="lblDesc" runat="server" Text="Mô tả"></asp:Label></td>
                        <td class="post" width="75%" align="left">
                            <asp:TextBox ID="txtControlDescription" runat="server" Height="103px" TextMode="MultiLine" Width="309px"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            <asp:Label ID="lblOrder" runat="server" Text="Thứ tự"></asp:Label></td>
                        <td class="post" width="75%" align="left">
                            <asp:DropDownList ID="dropControlOrder" runat="server" Width="79px">
                            </asp:DropDownList></td>
                    </tr>       
                    <tr>
                        <td class="postfooter" colspan="2" valign="middle" align="center">
                            <Button:Create ID="btnCreate" Text="Tạo mới" runat="server" CssClass="pbutton" Width="77px" OnClick="btnCreate_Click" />
                            &nbsp;
                            <Button:Update ID="btnUpdate" Text="Cập nhật" runat="server" CssClass="pbutton" Width="77px" OnClick="btnUpdate_Click" />
                            &nbsp;
                            <Button:Delete ID="btnDelete" Text="Xóa" runat="server" CssClass="pbutton" Width="77px" OnClick="btnDelete_Click" />
                            &nbsp;
                            <asp:Button ID="btnCancel" runat="server" CssClass="pbutton" Text="Hủy" Width="77px" OnClick="btnCancel_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</ContentTemplate>
</asp:UpdatePanel>